import java.util.Scanner;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextByte();
        int n1 = 0,n3 = 0;
        int n2 = 1;
        if(n == 1){
            System.out.println(0);
        }
        else if(n ==2){
            System.out.println(1);
        }else{
            for(int i = 3;i <= n;i++){
                n3 = n1 + n2;
                n1 = n2;
                n2 = n3;
            }
            System.out.println(n3);
        }
    }
}
